package com.gome.transactiontree.sample.case1;

import java.util.UUID;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Case1Main {
	static Logger LOG = LoggerFactory.getLogger(Case1Main.class);
	
	public static void main(String[] args) {
		ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("com/gome/transactiontree/sample/case1/case1.xml");
		BusinessA businessA = ctx.getBean(BusinessA.class);
		
//		BusinessB.exception = true;
		
		String txid = UUID.randomUUID().toString();
		String result = businessA.a1(txid, "p1");
		LOG.info("Case1Main result={} {}", txid, result);
	}
}